home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / clippings / 911014-01 < prev    next >
Encoding:
Text File  |  1991-10-15  |  4.5 KB  |  110 lines

  1. Newsgroups: alt.security
  2. From: fitz@mml0.meche.rpi.edu (Brian Fitzgerald)
  3. Subject: SUMMARY(pt 1/2): DO NOT depend on YP to hide passwd.adjunct
  4. Message-ID: <7=ap=sb@rpi.edu>
  5. Organization: Rensselaer Polytechnic Institute, Troy NY
  6. Date: 14 Oct 91 19:17:31 GMT
  7.  
  8. In July I wrote:
  9. >Why can I do this from my machine?
  10.  
  11. ># ypmatch -d notmydomain someguy passwd.adjunct.byname
  12. >someguy:nOtHiSrEaL.kY:::::
  13.  
  14. >I was under the impression that the adjunct passwd file was supposed to
  15. >be "hidden" to prevent such an occurrence.
  16.  
  17. (Significance: Any root user on the local broadcast network can read
  18. the encrypted passwords in any passwd.adjunct YP map, thus defeating
  19. the main purpose of a shadow password file.)
  20.  
  21. Peter Lamb, of Switzerland, showed me that the shadow password map
  22. exposure extends beyond the local network, and demonstrated directly to
  23. me how it is possible for a root user anywhere on the internet to
  24. obtain these encrypted strings from the passwd.adjunct map using remote
  25. procedure calls in a locally written C program.
  26.  
  27. I am told that Sun originally intended to fix the bug by 5/17/90.  This
  28. did not happen, but Sun recommends as a workaround:
  29.  
  30. ---------------
  31. This is a configuration issue until NIS 3.0 comes out. Configuration is
  32. this:
  33. 1) do not run the YP server on your Internet gateway
  34.  
  35. 2) do not do IP routing from your Internetgateway to the rest of your
  36. machines.
  37. This is simple to do in 4.1.1 Reference system and networking
  38. administration
  39. manual  page 704-705: ...
  40. ------
  41.  
  42. Comment:  I believe that (1) is "standard", but (2) is out of the
  43. question for individual departments within a large organization.
  44. Wouldn't doing that break just about every network program (rlogin,
  45. telnet, ftp)?  Followup comments welcome.
  46.  
  47. Neither suggestion really gets to the root of the problem.  To say "do
  48. not do IP routing ..." inappropriately shifts the burden for shadow
  49. password security from the host to the gateway.  Additionally, it is
  50. not possible or desirable for an individual sysadmin on a network
  51. shared by many systems with varying network requirements and interests
  52. to decide something like this.
  53.  
  54. Peter Lamb added some helpful ideas, the first of which, is admittedly
  55. "security through obscurity":
  56.  
  57. - use a hard-to-guess domain name.  The C program mentioned above
  58. relied on a domain name guessing routine.
  59.  
  60. - if you have Sun sources, patch ypserv yourself to accept only
  61. requests from specific machines.  Otherwise, obtain a patched binary
  62. >From somebody that has already done this.
  63.  
  64. Hope I've covered the essence of what workarounds have been suggested
  65. so far.  Feel free to elaborate in a followup, or to post information
  66. about how to obtain fixes for Sun OS 4.1.1 and earlier.
  67.  
  68. A few weeks ago somebody asked whether a Cisco router could help the YP
  69. situation.  Here's what RFC-1244 has to say:
  70.  
  71. 3.9.5.2  Router Packet Filtering
  72.  
  73.          Many commercially available gateway systems (more correctly
  74.          called routers) provide the ability to filter packets based not
  75.          only on sources or destinations, but also on source-destination
  76.          combinations.  This mechanism can be used to deny access to a
  77.          specific host, network, or subnet from any other host, network,
  78.          or subnet.
  79.  
  80.          Gateway systems from some vendors (e.g., cisco Systems) support
  81.          an even more complex scheme, allowing finer control over source
  82.          and destination addresses.  Via the use of address masks, one
  83.          can deny access to all but one host on a particular network.
  84.          The cisco Systems also allow packet screening based on IP
  85.          protocol type and TCP or UDP port numbers [14].
  86.  
  87.          This can also be circumvented by "source routing" packets
  88.          destined for the "secret" network.  Source routed packets may
  89.          be filtered out by gateways, but this may restrict other
  90.          legitimate activities, such as diagnosing routing problems.
  91.  
  92.   [14] Mogul, J., "Simple and Flexible Datagram Access Controls for
  93.        UNIX-based Gateways", Digital Western Research Laboratory
  94.        Research Report 89/4, March 1989.
  95.  
  96. Hope this bit of information helps.  Pose additional questions about
  97. routers to the newsgroup or the specific vendor.
  98.  
  99. Solely for brevity, I have not repeated most of the technical details
  100. about the security hole, but these were covered recently in articles by
  101. Peter Lamb, Jyrki Kuoppala, Adam Glass and others.  Thanks.
  102.  
  103. In conclusion, although Sun has not supplied a patch to OS 4.x which
  104. closes this security hole, it has recommended some workarounds.
  105.  
  106. Brian
  107.  
  108. Disclaimer: I do not work for ITS or ECS.  These are my opinions.
  109.  
  110.